import HttpService from "./service";

/**
 * @description 获取任务状态列表
 * @returns 
 */
export const getWorkAssignList = () => HttpService.get<any[]>("/odata/taskStatus");

/**
 * @description 删除任务分类
 * @param id 
 * @returns 
 */
export const delStak = (id: string) => HttpService.delete(`/api/taskStatus/${id}`);

/**
 * @description 获取任务列表
 * @returns 
 */
export const getWorkList = () => HttpService.get<any[]>("/odata/tasks");

// 删除任务
export const delWork = (id: string) => HttpService.delete(`/api/tasks/${id}`);

/**
 * @description 获取优先级列表
 * @returns 
 */
export const getPriorityList = () => HttpService.get<any[]>("/odata/Priorities")

/**
 * @description 新增任务
 * @param data 
 * @returns 
 */
export const addTask = (data: any) => HttpService.post("/api/tasks", data);

/**
 * @description 更新任务信息
 * @param data 
 * @returns 
 */
export const udpateTask = (data: any) => HttpService.put("/api/tasks", data);

// 新增任务状态
export const addStatus = (data: any) => HttpService.post("/api/taskStatus", data);

// 修改任务状态
export const editStatus = (data: any) => HttpService.put("/api/taskStatus", data);

// 新增优先级
export const addPriority = (data: any) => HttpService.post("/api/Priorities", data);
